::把H5GUIr打包成exe
@echo off
set venv=D:\zhh\venv\Scripts
::执行的脚本
set scriptPath=D:\privateProject\learnpy\H5GUI\tsMaker.py
::exe图标文件
set iconPath=D:\privateProject\learnpy\H5GUI\assets\ico_exe\logo.ico
::必要的库目录
set libPath=D:\zhh\venv\Lib\site-packages\PyQt5\Qt\bin
::dist目录 也就是生成的exe文件保存目录
set distPath=D:\privateProject\learnpy\H5GUI\dist
::版本信息文件
set versionPath=D:\privateProject\learnpy\H5GUI\assets\file_version_info.txt
::exe文件名
set exeName=H5GUI-v1.5
::build目录
set workpath=D:\zhh\qt_build\build
::删除旧版本
del /a /f /q %distPath%\H5GUI*.exe 

set from=D:\privateProject\learnpy\H5GUI\assets
set to=D:\privateProject\learnpy\H5GUI\dist\assets\
::del /a /f /q %to%
xcopy /e /s /h /f /y %from% %to% 

cd %venv% 
::cd到目录后 执行命令 这里是执行Python的进入虚拟目录的命令 cmd /k 不能同时执行&连接的两个命令 
start /b activate & pyinstaller --icon=%iconPath% --path %libPath% --distpath %distPath% --version-file=%versionPath% -n=%exeName% --workpath %workpath% --clean -Fw %scriptPath%




